<template>
  <el-dialog title="借调详情" :visible.sync="dialogVisible" append-to-body>
      <el-descriptions :column="2" border>
        <el-descriptions-item label="车牌号">{{ seconedInfo.carNo}}</el-descriptions-item>
        <el-descriptions-item label="车架号">{{ seconedInfo.vinNo }}</el-descriptions-item>
        <el-descriptions-item label="借调类型">借出车辆</el-descriptions-item>
        <el-descriptions-item label="借调同行">{{seconedInfo.sameJobName}}</el-descriptions-item>
        <el-descriptions-item label="借调开始时间">{{seconedInfo.startTime}}</el-descriptions-item>
        <el-descriptions-item label="预计借调结束日期">{{seconedInfo.estimateEndTime}}</el-descriptions-item>
        <el-descriptions-item label="预约借调天数">{{seconedInfo.estimateDay||'--'}}天</el-descriptions-item>
        <el-descriptions-item label="实际结束日期">{{seconedInfo.actualEndTime}}</el-descriptions-item>
        <el-descriptions-item label="实际借调天数">{{ seconedInfo.actualDay||'--'}}天</el-descriptions-item>
        <el-descriptions-item label="借调费用">{{seconedInfo.totalRent||'--'}}元</el-descriptions-item>
        <el-descriptions-item v-if="seconedInfo.secondedType==2&&seconedInfo.carSource==6&&seconedInfo.secondedStatus == 2">
          <template slot="label">托管费用</template>
          {{ seconedInfo.hostingFees }}
        </el-descriptions-item>
        <el-descriptions-item label="结算方式"> <dict-tag
          :options="dict.type.settlement_way"
          :value="seconedInfo.settlementWay"
        /></el-descriptions-item>
        <el-descriptions-item label="车辆初始图片">
          <template v-if="seconedInfo.initialPicture">
            <block v-for="item in seconedInfo.initialPicture" :key="item">
              <el-image :src="item|mmvImageUrl" :preview-src-list="[$mmvImageUrl(item)]" class="mmv-image" fit="contain"></el-image>
            </block>
          </template>

        </el-descriptions-item>
        <el-descriptions-item label="借调备注">{{seconedInfo.remark}}</el-descriptions-item>
        <el-descriptions-item label="借调结束图片">
          <template v-if="seconedInfo.endPicture">
            <block v-for="item in seconedInfo.endPicture" :key="item">
              <el-image :src="item|mmvImageUrl" :preview-src-list="[$mmvImageUrl(item)]" class="mmv-image" fit="contain"></el-image>
            </block>
          </template>
        </el-descriptions-item>
        <el-descriptions-item label="结束借调备注">{{seconedInfo.endRemark}}</el-descriptions-item>

      </el-descriptions>
    <div slot="footer" class="dialog-footer">
      <el-button @click="close">取 消</el-button>
    </div>
  </el-dialog>
</template>

<script>
import {
  getSeconded,
} from '@/api/seconded/seconded'
export default {
  dicts: [
    'settlement_way',
  ],
  components: {},
  props: {},
  data() {
    // 这里存放数据
    return {
      dialogVisible:false,
      seconedInfo:{}
    }
  },
  // 计算属性 类似于 data 概念
  computed: {},
  // 方法集合
  methods: {
    show(item){
      this.dialogVisible = true;
      getSeconded(item.bizNo).then(res=>{
        this.seconedInfo = res.data;
      })
    },
    close(){
      this.dialogVisible = false;
    }
  },
  // 生命周期 - 创建完成（可以访问当前this 实例）
  created() {
  },
  // 生命周期 - 挂载完成（可以访问 DOM 元素）
  mounted() {
  },

}
</script>

<style lang="scss" scoped>
</style>
